<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1 {
            padding: 10px;
            border: 3px solid #000;
            /* outline: 3px solid #000; */
            /* outline 轮廓 不会像border占据盒子大小 */
        }

        .div2 {
            float: left;
            padding: 10px;
            border: 3px solid red;
        }

        .box {
            background-color: #d32d2d;
            padding: 10px;
            width: 500px;
            height: 400px;
        }

        .rule1 {

            float: left;
            margin: 10px;
            padding: 10px;
            background-color: #eee;
            width: 100px;
            text-align: center;
        }
    </style>
</head>

<body>
    <div class="div1">
        <img src="https://img.36krcdn.com/20220427/v2_fe674d2293cd47af836693819dc1840d_img_png" alt="">
    </div>
    <div class="box">
        <!-- 行内元素 不能设置宽高，宽高靠内容撑起来 块级相关事情不要做 -->
        <span class="rule1">首页</span>
        <span class="rule1">发现</span>
        <span class="rule1">动态</span>
        <span class="rule1">我的</span>
    </div>
    <div class="div2">
        <img src="https://img.36krcdn.com/20220427/v2_450b492d3bff4b7e8264cf06f1867385_img_png" alt="">
    </div>
</body>

</html>